// import jsPDF from './simsun-normal'

export const stringToPDFDownload = (textContent:string, fileName ='bilibili') => {
  // const doc = new jsPDF();
  // doc.text(textContent, 10, 10);
  // doc.save(fileName);
  const blob = new Blob([textContent], {type: 'text/plain'});
  const url = URL.createObjectURL(blob);
  const a = document.createElement('a');
  a.href = url;
  a.download = fileName+'.txt';
  document.body.appendChild(a);
  a.click();
  document.body.removeChild(a);
  URL.revokeObjectURL(url);
}